package com.etc.demo1.demo.service.impl;

import com.etc.demo1.demo.domain.Goods;
import com.etc.demo1.demo.mapper.GoodsMapper;
import com.etc.demo1.demo.service.GoodsService;

import java.util.List;

public class GoodsServiceImpl implements GoodsService {

    private GoodsMapper goodsMapper;

    @Override
    public List<Goods> findAll() {
        return goodsMapper.findAll();
    }

    @Override
    public int save(Goods goods) {
        return goodsMapper.save(goods);
    }

    @Override
    public Integer delete(int id) {
        return goodsMapper.delete(id);
    }

    @Override
    public Goods getGoodsById(int id) {
        return goodsMapper.getById(id);
    }

    @Override
    public int update(Goods goods) {
        return goodsMapper.update(goods);
    }
}
